package com.dream.keigezhushou.Activity.acty.listen;

import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.dream.keigezhushou.Activity.BaseActivity;
import com.dream.keigezhushou.Activity.acty.listen.golden.ChooseLocalMusicActivity;
import com.dream.keigezhushou.Activity.acty.listen.golden.Golde30MessageActivity;
import com.dream.keigezhushou.Activity.acty.listen.golden.Golde30MyCollectedActivity;
import com.dream.keigezhushou.Activity.view.ColorArcProgressbar;
import com.dream.keigezhushou.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class Golde30SecondsMainActivity extends BaseActivity implements View.OnClickListener {


    @BindView(R.id.ib_msg_01)
    ImageView ibMsg01;
    @BindView(R.id.ib_make_01)
    TextView ibMake01;
    @BindView(R.id.rl_make_01)
    RelativeLayout rlMake01;
    @BindView(R.id.pb_progressbar)
    ColorArcProgressbar pbProgressbar;
    @BindView(R.id.FL_framelayout)
    FrameLayout FLFramelayout;
    @BindView(R.id.listened_music_counts)
    TextView listenedMusicCounts;
    @BindView(R.id.song_name)
    TextView songName;
    @BindView(R.id.singer)
    TextView singer;
    @BindView(R.id.collection)
    ImageView collection;
    @BindView(R.id.iv_next)
    ImageView ivNext;
    @BindView(R.id.rl_collection)
    LinearLayout rlCollection;
    @BindView(R.id.button)
    Button button;
    @BindView(R.id.ib_return)
    ImageView ibReturn;
    @BindView(R.id.ib_collected)
    Button ibCollected;
    @BindView(R.id.textView)
    TextView textView;
    @BindView(R.id.rl_ltitle)
    RelativeLayout rlLtitle;
    @BindView(R.id.activity_golde30_seconds_main)
    RelativeLayout activityGolde30SecondsMain;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_golde30_seconds_main);
        ButterKnife.bind(this);

        initData();
        Resources res = getResources();
        Bitmap bmp = BitmapFactory.decodeResource(res, R.drawable.a_002);
        pbProgressbar.setImage(bmp);
    }


    //初始化数据
    protected void initData() {

        ibMsg01.setOnClickListener(this);
        ibCollected.setOnClickListener(this);
        ibMake01.setOnClickListener(this);
        ibReturn.setOnClickListener(this);
        button.setOnClickListener(this);
    }


    //点击事件的实现
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.ib_msg_01:
                intent = new Intent(this, Golde30MessageActivity.class);
                startActivity(intent);
                break;
            case R.id.ib_collected:
                intent = new Intent(this, Golde30MyCollectedActivity.class);
                intent.putExtra("state", "挑歌历史");
                startActivity(intent);
                break;
            case R.id.ib_return:
                finish();
                break;
            case R.id.ib_make_01:
                intent = new Intent(this, LocalMusicActivity.class);
                startActivity(intent);
                break;
            case R.id.button:
                intent = new Intent(this, Golde30MyCollectedActivity.class);
                intent.putExtra("state", "我的收藏");
                startActivity(intent);
                break;

        }

    }
}
